package com.zsqx.action;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.interceptor.ServletRequestAware;
import org.apache.struts2.interceptor.ServletResponseAware;
import org.apache.struts2.interceptor.SessionAware;
import org.apache.struts2.util.ServletContextAware;

import cDao.HelpDao;
import cDao.annotation.FindMethodType;

import com.opensymphony.xwork2.ActionSupport;
import com.zsqx.dao.BaseDAO;
import com.zsqx.tools.PageBean;

public class BaseAction extends ActionSupport implements SessionAware, ServletRequestAware, ServletResponseAware,ServletContextAware  {
	
	public static final String SUCCESS = "<font color='#0000ff'>操作成功！</font>";
	public static final String FAIL  = "<font color='#ff0000'>操作失败！</font>";
	protected Map<String, Object> session;
	protected HttpServletRequest request;
	protected static HttpServletResponse response;
	protected ServletContext servletContext;
	protected String message;
	protected String fromURL;
	protected PageBean pageBean;
	protected Integer currentPage;
	protected BaseDAO baseDAO=new BaseDAO();
	
	public void setSession(Map<String, Object> arg0) {
		this.session = arg0;
	}
	public void setServletRequest(HttpServletRequest arg0) {
		this.request = arg0;
	}
	public void setServletResponse(HttpServletResponse arg0) {
		this.response = arg0;
	}
	public void setServletContext(ServletContext arg0) {
		this.servletContext = arg0;
	}
	public String getFromURL() {
		return fromURL;
	}
	public void setFromURL(String fromURL) {
		this.fromURL = fromURL;
	}
	public PageBean getPageBean() {
		return pageBean;
	}
	public void setPageBean(PageBean pageBean) {
		this.pageBean = pageBean;
	}
	public Integer getCurrentPage() {
		return currentPage;
	}
	public void setCurrentPage(Integer currentPage) {
		this.currentPage = currentPage;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
}
